// slice 的而外用法
const arr = [5, 1, 23, 434];
const newArr = arr.slice(0);
console.log(newArr, arr);

const obj = {
  0: "a",
  1: "b",
  length: 2,
};

const arr2 = Array.prototype.slice.call(obj);
const arr3 = [].slice.call(obj);
console.log(arr2, arr3);
